<%@ page language="java" contentType="text/html; charset=UTF-8"	 pageEncoding="UTF-8"%>
<%@ include file="../include/laypublic.jsp"%>
<!DOCTYPE html>
<html>
<head>
  <title>收款单登记表详情</title>
</head>
<style>
	.fieldset{
		margin-top: 5px;
		margin-bottom: 0px
	}
	.layui-legend{
		background-color:#5fb878;
		font-size:15px !important;
		width:140px;
	}
	.layui-form-item {
	    margin-bottom: 5px;
	    clear: both;
	    *zoom: 1;
	}
	.layui-form-label{width: 180px;}
</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
	    <div class="layui-tab-item layui-show">
	    	<div style="padding-top:15px;">&nbsp;</div>
			<form class="layui-form" id="addInfo_form" lay-filter="add_info_from">
				<fieldset class="layui-elem-field layui-field-title fieldset"  id="baseInfo">
				  <legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">付款单信息  ></legend>
				  <div style="margin-top:20px">
				  	<div class="layui-form-item">
				  		<div class="layui-inline">
					      	<label class="layui-form-label">登记公司</label>
					      	<div class="layui-input-inline">
								<input type="text" value="${payBill.orgName}" style="border:0px;width:220px" readonly="readonly" class="layui-input">
					      	</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label">登记部门</label>
				      		<div class="layui-input-inline">
								<input type="text" value="${payBill.deptName}" style="border:0px;" readonly="readonly" class="layui-input">
				      		</div>
					    </div>
					    <div class="layui-inline">
					    	<label class="layui-form-label">登记人</label>
				      		<div class="layui-input-inline">
				        		<input type="text" name="staffName" value="${payBill.staffName }" readonly="readonly" style="border:0px" class="layui-input">
				      		</div>
					    </div>
				    </div>
				  	<div class="layui-form-item">
				  		<div class="layui-inline">
					    	<label class="layui-form-label">付款业务来源</label>
				      		<div class="layui-input-inline">
				        		<infopub:select name="fromType" value="${payBill.fromType }" disabled="disabled" type="dic" groupNo="A00010067"></infopub:select>
				      		</div>
				    	</div>
		    			<div class="layui-inline">
					    	<label class="layui-form-label">付款公司</label>
				      		<div class="layui-input-inline">
		    					<input type="text" value="${payBill.billOrgName }" style="border:0px;width:220px" readonly="readonly" class="layui-input">
				      		</div>
					    </div>
				  		<div class="layui-inline">
					    	<label class="layui-form-label">付款归属项目</label>
				      		<div class="layui-input-inline">
		    					<input type="text" name="proName" value="${payBill.proName }" style="border:0px;width:220px" readonly="readonly" class="layui-input">
				      		</div>
					    </div>
				    </div>
				  	<div class="layui-form-item">
				  		<div class="layui-inline">
					    	<label class="layui-form-label">结算方式</label>
				      		<div class="layui-input-inline">
				        		<infopub:select value="${payBill.settlementMode}" type="dic" groupNo="A00010063" disabled="disabled"></infopub:select>
				      		</div>
					    </div>
				  		 <div class="layui-inline">
					    	<label class="layui-form-label">付款日期</label>
				      		<div class="layui-input-inline">
				      			<input type="text" class="layui-input" style="border:0px" value="<fmt:formatDate value="${payBill.payDate }" pattern="yyyy-MM-dd"/>">
				      		</div>
					    </div>
				    </div>
				  	<div class="layui-form-item">
				  		<div class="layui-inline">
					    	<label class="layui-form-label">应付总额（元）</label>
				      		<div class="layui-input-inline">
				        		<input type="text" name="willPayAmount" value="${payBill.willPayAmount }" style="border:0px" readonly="readonly" class="layui-input">
				      		</div>
					    </div>
				  		<div class="layui-inline">
					    	<label class="layui-form-label">实付总额（元）</label>
				      		<div class="layui-input-inline">
				        		<input type="text" name="actPayAmount" value="${payBill.actPayAmount }" style="border:0px" readonly="readonly" class="layui-input">
				      		</div>
					    </div>
				    </div>
				  	<div class="layui-form-item">
				  		 <div class="layui-inline">
					    	<label class="layui-form-label">付款摘要</label>
				      		<div class="layui-input-inline">
				      			<textarea name="paySummary" class="layui-textarea" readonly="readonly" style="width:899px;min-height:50px;">${payBill.paySummary }</textarea>
				      		</div>
					    </div>
				    </div>
		  		</div>
			</fieldset>
			<c:choose>
				<c:when test="${payBill.fromType == '3' }">
					<fieldset class="layui-elem-field layui-field-title fieldset"  id="detailInfo">
				  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">申请还款明细 ></legend>
					  	<div style="margin-top:20px">
					  		<div class="layui-form-item" style="margin: 0 20px;">
					  			<table class="layui-table layuiadmin-page-table" lay-skin="line">
				                  	<thead>
				                    	<tr>
				                      		<th>序号</th>
				                      		<th>还款对象单位</th>
				                      		<th>还款类型</th>
					                      	<th>还款金额（元）</th>
					                      	<th>实付金额（元）</th>
					                      	<th>支出类型</th>
					                    </tr> 
				                  	</thead>
				                  	<tbody>
			                  		<c:forEach items="${payBill.payBillDetails }" var="detail" varStatus="status">
						  				<tr>
				                      		<td>${status.count }</td>
				                      		<td>${detail.accountName }</td>
				                      		<td>${detail.repayType == '1' ? '归还本金':'支付利息'}</td>
				                      		<td>${detail.applyAmount }</td>
				                      		<td>${detail.actPayAmount }</td>
				                      		<td><infopub:select value="${detail.payOutType}" type="dic" groupNo="A00010068" disabled="disabled"></infopub:select></td>
				                    	</tr>
									</c:forEach>
				                  	</tbody>
									<tfoot>
					                    <tr>
					                      <td>合计</td>
					                      <td></td>
					                      <td></td>
					                      <td>${payBill.willPayAmount }</td>
					                      <td id="actPayAmount"></td>
					                      <td></td>
					                    </tr>
				                  	</tfoot>
			                  	</table>
		                  	</div>
					  	</div>
					</fieldset>
				</c:when>
				<c:when test="${payBill.fromType == '5' }">
					<fieldset class="layui-elem-field layui-field-title fieldset"  id="detailInfo">
				  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">申请税费明细 ></legend>
					  	<div style="margin-top:20px">
					  		<div class="layui-form-item" style="margin: 0 20px;">
					  			<table class="layui-table layuiadmin-page-table" lay-skin="line">
				                  	<thead>
				                    	<tr>
				                      		<th>序号</th>
				                      		<th>税费类型</th>
					                      	<th>是否费用化</th>
					                      	<th>税费金额（元）</th>
					                      	<th>实付金额（元）</th>
					                      	<th>支出类型</th>
					                    </tr> 
				                  	</thead>
				                  	<tbody>
			                  		<c:forEach items="${payBill.payBillDetails }" var="detail" varStatus="status">
						  				<tr>
				                      		<td>${status.count }</td>
				                      		<td>
				                      				<infopub:select value="${detail.taxType }" name="taxType" disabled="disabled" type="dic" groupNo="A00010065"></infopub:select>
											</td>
											<td>${detail.countFlag == '1' ? '是':'否' }</td>
				                      		<td>${detail.applyAmount }</td>
				                      		<td>${detail.actPayAmount }</td>
				                      		<td><infopub:select value="${detail.payOutType}" type="dic" groupNo="A00010068" disabled="disabled"></infopub:select></td>
				                    	</tr>
									</c:forEach>
				                  	</tbody>
									<tfoot>
					                    <tr>
					                      <td>合计</td>
					                      <td></td>
					                      <td></td>
					                      <td>${payBill.willPayAmount }</td>
					                      <td id="actPayAmount"></td>
					                      <td></td>
					                    </tr>
				                  	</tfoot>
			                  	</table>
		                  	</div>
					  	</div>
					</fieldset>
				</c:when>
				<c:otherwise>
					<fieldset class="layui-elem-field layui-field-title fieldset"  id="detailInfo">
				  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">申请付款明细 ></legend>
					  	<div style="margin-top:20px">
					  		<div class="layui-form-item" style="margin: 0 20px;">
					  			<table class="layui-table layuiadmin-page-table" lay-skin="line">
				                  	<thead>
				                    	<tr>
				                      		<th>序号</th>
				                      		<th>支付对象单位</th>
					                      	<th>申请付款金额（元）</th>
					                      	<th>实付金额（元）</th>
					                      	<th>支出类型</th>
					                    </tr> 
				                  	</thead>
				                  	<tbody>
			                  		<c:forEach items="${payBill.payBillDetails }" var="detail" varStatus="status">
						  				<tr>
				                      		<td>${status.count }<input type="hidden" name="payBillDetails[${status.index }].id" value="${detail.id}"></td>
				                      		<td>${detail.accountName }</td>
				                      		<td>${detail.applyAmount }</td>
				                      		<td>${detail.actPayAmount }</td>
				                      		<td><infopub:select value="${detail.payOutType}" type="dic" groupNo="A00010068" disabled="disabled"></infopub:select></td>
				                    	</tr>
									</c:forEach>
				                  	</tbody>
									<tfoot>
					                    <tr>
					                      <td>合计</td>
					                      <td></td>
					                      <td>${payBill.willPayAmount }</td>
					                      <td>${payBill.actPayAmount }</td>
					                      <td></td>
					                    </tr>
				                  	</tfoot>
			                  	</table>
		                  	</div>
					  	</div>
					</fieldset>
				</c:otherwise>
			</c:choose>
			<c:if test="${payBill.state == 2 }">
				<fieldset class="layui-elem-field layui-field-title fieldset"  id="detailInfo">
			  		<legend class="layui-btn layui-legend" style="text-align:left;cursor:default;">作废原因 ></legend>
				  	<div style="margin-top:20px">
				  		<div class="layui-form-item" style="margin: 0 0 20px 20px;">
				      		<div class="layui-input-inline">
				        		<textarea name="paySummary" class="layui-textarea" readonly="readonly" style="width:899px;min-height:50px;">${payBill.memo }</textarea>
				      		</div>
				  		</div>
				  	</div>
			  	</fieldset>
		  	</c:if>
			</form>
  		</div>
	</div>
</div>
  <script>
	//静态资源路径前缀
	var staticPath = '${fileHttpPre}';
	var stateJSON = <infopub:dicJson groupNo="A00010028" />;
	
  layui.config({
    base: '${ctx}/resources/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'set'], function(){
    var $ = layui.$;
  	
  });
  
  </script>
</body>
</html>

